/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package macchina.istruzioni;

import macchina.Logger;
import macchina.Macchinina;

/**
 *
 * @author the_nihilant
 */
public class Wd implements macchina.Istruzione {

    public byte execute(short ADDR, Macchinina m, byte uinstr, Logger debug) {
        int aa=m.readA();
        m.writeA((aa>>1)|(aa&0x20000));
        m.writeB(((m.readB()>>1)&0xFFFF)|(aa&0x20000)|((aa&1)<<16));
        return 0;
    }

}
